.class public abstract Lnet/tsapps/topdeals/abstractactivities/BaseActivity;
.super Landroid/support/v4/app/FragmentActivity;

# interfaces
.implements Lde/madvertise/android/sdk/d;


# instance fields
.field protected a:Landroid/content/Context;

.field protected b:Lnet/tsapps/topdeals/h/a;

.field private i:Landroid/app/ProgressDialog;

.field private j:Lcom/google/ads/AdView;

.field private k:Lnet/tsapps/topdeals/ads/apprupt/b;

.field private l:Landroid/widget/LinearLayout;


# direct methods
.method public constructor <init>()V
    .locals 0

    invoke-direct {p0}, Landroid/support/v4/app/FragmentActivity;-><init>()V

    iput-object p0, p0, Lnet/tsapps/topdeals/abstractactivities/BaseActivity;->a:Landroid/content/Context;

    return-void
.end method

.method private a()V
    .locals 3

    new-instance v0, Lcom/google/ads/AdView;

    sget-object v1, Lcom/google/ads/as;->a:Lcom/google/ads/as;

    const-string v2, "a14ce721325804a"

    invoke-direct {v0, p0, v1, v2}, Lcom/google/ads/AdView;-><init>(Landroid/app/Activity;Lcom/google/ads/as;Ljava/lang/String;)V

    iput-object v0, p0, Lnet/tsapps/topdeals/abstractactivities/BaseActivity;->j:Lcom/google/ads/AdView;

    iget-object v0, p0, Lnet/tsapps/topdeals/abstractactivities/BaseActivity;->l:Landroid/widget/LinearLayout;

    invoke-virtual {v0}, Landroid/widget/LinearLayout;->removeAllViews()V

    iget-object v0, p0, Lnet/tsapps/topdeals/abstractactivities/BaseActivity;->l:Landroid/widget/LinearLayout;

    iget-object v1, p0, Lnet/tsapps/topdeals/abstractactivities/BaseActivity;->j:Lcom/google/ads/AdView;

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    iget-object v0, p0, Lnet/tsapps/topdeals/abstractactivities/BaseActivity;->j:Lcom/google/ads/AdView;

    new-instance v1, Lcom/google/ads/ai;

    invoke-direct {v1}, Lcom/google/ads/ai;-><init>()V

    invoke-virtual {v0, v1}, Lcom/google/ads/AdView;->a(Lcom/google/ads/ai;)V

    return-void
.end method

.method private e()V
    .locals 2

    iget-object v0, p0, Lnet/tsapps/topdeals/abstractactivities/BaseActivity;->k:Lnet/tsapps/topdeals/ads/apprupt/b;

    if-nez v0, :cond_0

    new-instance v0, Lnet/tsapps/topdeals/ads/apprupt/b;

    invoke-direct {v0, p0}, Lnet/tsapps/topdeals/ads/apprupt/b;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lnet/tsapps/topdeals/abstractactivities/BaseActivity;->k:Lnet/tsapps/topdeals/ads/apprupt/b;

    :cond_0
    iget-object v0, p0, Lnet/tsapps/topdeals/abstractactivities/BaseActivity;->l:Landroid/widget/LinearLayout;

    iget-object v1, p0, Lnet/tsapps/topdeals/abstractactivities/BaseActivity;->k:Lnet/tsapps/topdeals/ads/apprupt/b;

    invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    invoke-virtual {p0}, Lnet/tsapps/topdeals/abstractactivities/BaseActivity;->d()V

    return-void
.end method


# virtual methods
.method public final a(Ljava/lang/String;)V
    .locals 1

    const/4 v0, 0x0

    invoke-static {p0, p1, v0}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v0

    invoke-virtual {v0}, Landroid/widget/Toast;->show()V

    return-void
.end method

.method protected final a(Lnet/tsapps/topdeals/g/a;)V
    .locals 1

    new-instance v0, Lnet/tsapps/topdeals/abstractactivities/a;

    invoke-direct {v0, p0, p1}, Lnet/tsapps/topdeals/abstractactivities/a;-><init>(Lnet/tsapps/topdeals/abstractactivities/BaseActivity;Lnet/tsapps/topdeals/g/a;)V

    invoke-virtual {p0, v0}, Lnet/tsapps/topdeals/abstractactivities/BaseActivity;->runOnUiThread(Ljava/lang/Runnable;)V

    return-void
.end method

.method public final a(ZLde/madvertise/android/sdk/MadView;)V
    .locals 5

    const-wide/16 v3, 0x0

    if-eqz p1, :cond_1

    const/4 v0, 0x0

    invoke-virtual {p2, v0}, Lde/madvertise/android/sdk/MadView;->setVisibility(I)V

    :cond_0
    :goto_0
    return-void

    :cond_1
    iget-object v0, p0, Lnet/tsapps/topdeals/abstractactivities/BaseActivity;->b:Lnet/tsapps/topdeals/h/a;

    invoke-virtual {v0}, Lnet/tsapps/topdeals/h/a;->n()I

    move-result v0

    int-to-long v1, v0

    cmp-long v0, v1, v3

    if-eqz v0, :cond_3

    iget-object v0, p0, Lnet/tsapps/topdeals/abstractactivities/BaseActivity;->l:Landroid/widget/LinearLayout;

    invoke-virtual {v0}, Landroid/widget/LinearLayout;->removeAllViews()V

    const v0, 0x7f05000e

    invoke-virtual {p0, v0}, Lnet/tsapps/topdeals/abstractactivities/BaseActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/LinearLayout;

    iput-object v0, p0, Lnet/tsapps/topdeals/abstractactivities/BaseActivity;->l:Landroid/widget/LinearLayout;

    cmp-long v0, v1, v3

    if-eqz v0, :cond_0

    const-wide/16 v3, 0x1

    cmp-long v0, v1, v3

    if-nez v0, :cond_2

    invoke-direct {p0}, Lnet/tsapps/topdeals/abstractactivities/BaseActivity;->e()V

    goto :goto_0

    :cond_2
    const-wide/16 v3, 0x2

    cmp-long v0, v1, v3

    if-nez v0, :cond_0

    invoke-direct {p0}, Lnet/tsapps/topdeals/abstractactivities/BaseActivity;->a()V

    goto :goto_0

    :cond_3
    const/16 v0, 0x8

    invoke-virtual {p2, v0}, Lde/madvertise/android/sdk/MadView;->setVisibility(I)V

    goto :goto_0
.end method

.method protected final b()V
    .locals 1

    :try_start_0
    iget-object v0, p0, Lnet/tsapps/topdeals/abstractactivities/BaseActivity;->i:Landroid/app/ProgressDialog;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lnet/tsapps/topdeals/abstractactivities/BaseActivity;->i:Landroid/app/ProgressDialog;

    invoke-virtual {v0}, Landroid/app/ProgressDialog;->dismiss()V

    const/4 v0, 0x0

    iput-object v0, p0, Lnet/tsapps/topdeals/abstractactivities/BaseActivity;->i:Landroid/app/ProgressDialog;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :cond_0
    :goto_0
    return-void

    :catch_0
    move-exception v0

    goto :goto_0
.end method

.method protected final b(Ljava/lang/String;)V
    .locals 2

    iget-object v0, p0, Lnet/tsapps/topdeals/abstractactivities/BaseActivity;->i:Landroid/app/ProgressDialog;

    if-eqz v0, :cond_0

    invoke-virtual {p0}, Lnet/tsapps/topdeals/abstractactivities/BaseActivity;->b()V

    :cond_0
    const/4 v0, 0x0

    const/4 v1, 0x1

    invoke-static {p0, v0, p1, v1}, Landroid/app/ProgressDialog;->show(Landroid/content/Context;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Z)Landroid/app/ProgressDialog;

    move-result-object v0

    iput-object v0, p0, Lnet/tsapps/topdeals/abstractactivities/BaseActivity;->i:Landroid/app/ProgressDialog;

    return-void
.end method

.method protected final c()V
    .locals 5

    iget-object v0, p0, Lnet/tsapps/topdeals/abstractactivities/BaseActivity;->b:Lnet/tsapps/topdeals/h/a;

    invoke-virtual {v0}, Lnet/tsapps/topdeals/h/a;->m()I

    move-result v0

    int-to-long v1, v0

    const v0, 0x7f05000e

    invoke-virtual {p0, v0}, Lnet/tsapps/topdeals/abstractactivities/BaseActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/LinearLayout;

    iput-object v0, p0, Lnet/tsapps/topdeals/abstractactivities/BaseActivity;->l:Landroid/widget/LinearLayout;

    const-wide/16 v3, 0x0

    cmp-long v0, v1, v3

    if-eqz v0, :cond_0

    const-wide/16 v3, 0x1

    cmp-long v0, v1, v3

    if-nez v0, :cond_1

    new-instance v0, Lnet/tsapps/topdeals/ads/a/a;

    invoke-direct {v0, p0}, Lnet/tsapps/topdeals/ads/a/a;-><init>(Landroid/content/Context;)V

    new-instance v1, Landroid/widget/LinearLayout$LayoutParams;

    const/4 v2, -0x1

    const/4 v3, -0x2

    const/4 v4, 0x0

    invoke-direct {v1, v2, v3, v4}, Landroid/widget/LinearLayout$LayoutParams;-><init>(IIF)V

    invoke-virtual {v0, v1}, Lnet/tsapps/topdeals/ads/a/a;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V

    invoke-virtual {v0, p0}, Lnet/tsapps/topdeals/ads/a/a;->a(Lde/madvertise/android/sdk/d;)V

    iget-object v1, p0, Lnet/tsapps/topdeals/abstractactivities/BaseActivity;->l:Landroid/widget/LinearLayout;

    invoke-virtual {v1, v0}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;)V

    const/16 v1, 0x8

    invoke-virtual {v0, v1}, Lnet/tsapps/topdeals/ads/a/a;->setVisibility(I)V

    :cond_0
    :goto_0
    return-void

    :cond_1
    const-wide/16 v3, 0x2

    cmp-long v0, v1, v3

    if-nez v0, :cond_2

    invoke-direct {p0}, Lnet/tsapps/topdeals/abstractactivities/BaseActivity;->e()V

    goto :goto_0

    :cond_2
    const-wide/16 v3, 0x3

    cmp-long v0, v1, v3

    if-nez v0, :cond_0

    invoke-direct {p0}, Lnet/tsapps/topdeals/abstractactivities/BaseActivity;->a()V

    goto :goto_0
.end method

.method protected final d()V
    .locals 4

    iget-object v0, p0, Lnet/tsapps/topdeals/abstractactivities/BaseActivity;->k:Lnet/tsapps/topdeals/ads/apprupt/b;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lnet/tsapps/topdeals/abstractactivities/BaseActivity;->k:Lnet/tsapps/topdeals/ads/apprupt/b;

    const-string v1, "6614"

    const-string v2, "App der Woche,Top Downloads,Finanzen,Productivity"

    const-string v3, "Shopping,Angebote,Deals,Gutscheine,Rabatt,Schn\u00e4ppchen"

    invoke-virtual {v0, v1, v2, v3}, Lnet/tsapps/topdeals/ads/apprupt/b;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V

    :cond_0
    return-void
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 2

    invoke-super {p0, p1}, Landroid/support/v4/app/FragmentActivity;->onCreate(Landroid/os/Bundle;)V

    new-instance v0, Lnet/tsapps/topdeals/h/a;

    invoke-virtual {p0}, Lnet/tsapps/topdeals/abstractactivities/BaseActivity;->getApplicationContext()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v0, v1}, Lnet/tsapps/topdeals/h/a;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lnet/tsapps/topdeals/abstractactivities/BaseActivity;->b:Lnet/tsapps/topdeals/h/a;

    return-void
.end method
